import { Body, Controller, Get, Post, Res } from "@nestjs/common"
import { CopyrightService } from "./copyright.service"
import { Response } from "express"

@Controller("/copyright")
export class CopyrightController {
  constructor(private readonly setService: CopyrightService) {}
  // Get copyright configuration
  @Get("/getConfig")
  async getConfig(@Res() res: Response): Promise<void> {
    return await this.setService.getConfig(res)
  }

  // Save the copyright configuration
  @Post("/saveConfig")
  async saveConfig(@Body() body: object, @Res() res: Response): Promise<void> {
    return await this.setService.saveConfig(body, res)
  }
}
